<!-- 购货单 中心库房购货入库-->
<template>

    <el-main style="height: 930px;">
 <template>
      <div style="margin: 10px 0">
        <el-button type="primary" @click="addBuyBill">新增 <i class="el-icon-circle-plus-outline"></i></el-button>
        <el-date-picker
          v-model="selectDate"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期">
        </el-date-picker>
        <el-input style="width: 200px" placeholder="请输入出入库类型" suffix-icon="el-icon-position" class="ml-5" v-model="selectStage"></el-input>
        <el-button class="ml-5" type="primary" @click="load">搜索</el-button>
        <el-button type="warning" @click="reset">重置</el-button>
      </div>
 </template>

      <div>
            <el-table
                :data="buyTableData"
                :cell-style="{textAlign:'center'}"
                :header-cell-style="{textAlign:'center'}"
                style="width: 100%;"
                empty-text="无"
                v-loading="loading"
                element-loading-text="拼命加载中"
                element-loading-spinner="el-icon-loading">
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column prop="id" label="购货单号" width="120"></el-table-column>
              <el-table-column prop="warehouseName" label="库房名称" width="120"></el-table-column>
              <el-table-column prop="stage" label="状态" width="180"></el-table-column>
              <el-table-column prop="date" label="日期" width="200" ></el-table-column>
              <el-table-column label="操作"   align="center">
                <template slot-scope="scope">
                  <el-button type="success" @click="chosenBuyBillShow(scope.$index, scope.row)">查看商品详情<i class="el-icon-edit"></i></el-button>
                  <el-button type="success" @click="createDepDialogShow(scope.$index,scope.row)">入库<i class="el-icon-edit"></i></el-button>
                  <el-button type="success" @click="chosenBuyBillEdit(scope.$index,scope.row)">编辑<i class="el-icon-edit"></i></el-button>
                  <el-popconfirm
                    class="ml-5"
                    confirm-button-text='确定'
                    cancel-button-text='我再想想'
                    icon="el-icon-info"
                    icon-color="red"
                    title="您确定删除吗？"
                    @confirm="delBuyBill(scope.row.id)"
                  >
                    <el-button type="danger" slot="reference">删除 <i class="el-icon-remove-outline"></i></el-button>
                  </el-popconfirm>
                </template>
                </el-table-column>
              </el-table>
          </div>

      <div style="padding: 10px 0">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="pageNum"
          :page-sizes="[2, 5, 10, 20]"
          :page-size="pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="buyTotal">
        </el-pagination>
      </div>

      <el-dialog title="新增购货单" :visible.sync="createBuyDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="库房名称">
            <el-input v-model="createBuyDialog.warehouseName" autocomplete="off" style="width: 300px"></el-input>
          </el-form-item>
          <el-form-item label="日期" >
            <el-date-picker
              v-model="createBuyDialog.date"
              type="date"
              value-format="yyyy-MM-dd"
              style="width: 300px"
              placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="createBuyDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="carDesDialogShow">下一步</el-button>
        </div>
      </el-dialog>

      <el-dialog title="编辑购货单" :visible.sync="editBuyDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="库房名称">
            <el-input v-model="editBuyDialog.warehouseName" autocomplete="off" style="width: 300px"></el-input>
          </el-form-item>
          <el-form-item label="日期" >
            <el-date-picker
              v-model="editBuyDialog.date"
              type="date"
              value-format="yyyy-MM-dd"
              style="width: 300px"
              placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editBuyDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="nextEdit">下一步</el-button>
        </div>
      </el-dialog>

      <el-dialog title="入库操作" :visible.sync="entryQueryDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="库房名称" >
            <el-input v-model="entryQueryDialog.warehouseName" autocomplete="off" style="width: 300px"></el-input>
          </el-form-item>
          <el-form-item label="任务单" >
            <el-input v-model="entryQueryDialog.missionID" autocomplete="off" style="width: 300px"></el-input>
          </el-form-item>
          <el-form-item label="日期" >
              <el-date-picker
                v-model="entryQueryDialog.date"
                value-format="yyyy-MM-dd"
                type="date"
                style="width: 300px"
                placeholder="选择日期">
              </el-date-picker>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="entryQueryDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="nextEntry()">下一步</el-button>
        </div>
      </el-dialog>


      <el-dialog title="新增商品详情" :visible.sync="addCargoDescriptionDialogVisible">
        <el-table :data="createCargoTableData">
          <el-table-column property="cargoName" label="商品名称" width="200"></el-table-column>
          <el-table-column property="quantities" label="入库数量"></el-table-column>
          <el-table-column label="操作"  width="200" align="center">
            <template slot-scope="scope1">
              <el-button type="success" @click="editAddCarDesShow(scope1.$index,scope1.row)">编辑<i class="el-icon-edit"></i></el-button>
              <el-popconfirm
                class="ml-5"
                confirm-button-text='确定'
                cancel-button-text='我再想想'
                icon="el-icon-info"
                icon-color="red"
                title="您确定删除吗？"
                @confirm="delCreateCargoDes(scope1.row.cargoName)"
              >
                <el-button type="danger" slot="reference">删除 <i class="el-icon-remove-outline"></i></el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer">
          <el-button @click="addCargoDescriptionDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="createCarDialogShow">新增</el-button>
          <el-button type="primary" @click="finish">完成</el-button>
        </div>
      </el-dialog>

      <el-dialog title="展示商品详情" :visible.sync="showCargoDescriptionDialogVisible">
        <el-table :data="showCargoTableData">
          <el-table-column property="id" label="商品代码" width="200"></el-table-column>
          <el-table-column property="cargoName" label="商品名称" width="200"></el-table-column>
          <el-table-column property="unit" label="计量单位"></el-table-column>
          <el-table-column property="quantities" label="入库数量"></el-table-column>
        </el-table>
      </el-dialog>

      <el-dialog title="编辑商品详情" :visible.sync="editCargoDescriptionDialogVisible">
        <el-table :data="editCargoTableData">
          <el-table-column property="id" label="商品代码" width="130" type=""></el-table-column>
          <el-table-column property="cargoName" label="商品名称" width="130"></el-table-column>
          <el-table-column property="unit" label="计量单位" width="130"></el-table-column>
          <el-table-column property="quantities" label="入库数量" width="130" ></el-table-column>
          <el-table-column label="操作"  width="200" align="center">
            <template slot-scope="scope1">
              <el-button type="success" @click="editEditCarDesShow(scope1.$index,scope1.row)">编辑<i class="el-icon-edit"></i></el-button>
              <el-popconfirm
                class="ml-5"
                confirm-button-text='确定'
                cancel-button-text='我再想想'
                icon="el-icon-info"
                icon-color="red"
                title="您确定删除吗？"
                @confirm="delEditCargoDes(scope1.row.cargoName)"
              >
                <el-button type="danger" slot="reference">删除 <i class="el-icon-remove-outline"></i></el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer">
          <el-button @click="addCargoDescriptionDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="editCarDialogShow">新增</el-button>
          <el-button type="primary" @click="editCargoDes">完成</el-button>
        </div>
      </el-dialog>

      <el-dialog title="入库表格详情" :visible.sync="entryQueryDescriptionDialogVisible">
        <el-table :data="entryQueryCargoTableData">
          <el-table-column property="id" label="商品代码" width="130" type=""></el-table-column>
          <el-table-column property="cargoName" label="商品名称" width="130"></el-table-column>
          <el-table-column property="unit" label="计量单位" width="130"></el-table-column>
          <el-table-column property="quantities" label="入库数量" width="130"></el-table-column>
          <el-table-column label="操作"  width="200" align="center">
            <template slot-scope="scope1">
              <el-button type="success" @click="editEntryQueryCarDesShow(scope1.$index,scope1.row)">编辑<i class="el-icon-edit"></i></el-button>
              <el-popconfirm
                class="ml-5"
                confirm-button-text='确定'
                cancel-button-text='我再想想'
                icon="el-icon-info"
                icon-color="red"
                title="您确定删除吗？"
                @confirm="delEntryQueryCargoDes(scope1.row.cargoName)"
              >
                <el-button type="danger" slot="reference">删除 <i class="el-icon-remove-outline"></i></el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer">
          <el-button @click="addCargoDescriptionDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="entryQueryCarDialogShow">新增</el-button>
          <el-button type="primary" @click="entryQueryCargoDes">完成</el-button>
        </div>
      </el-dialog>

      <el-dialog title="新增入库商品表格" :visible.sync="createCargoDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="商品名称">
            <el-input v-model="createCargoDialog.cargoName" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="商品数量">
            <el-input v-model="createCargoDialog.quantities" autocomplete="off"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="createCargoDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="addCargoDes">确 定</el-button>
        </div>
      </el-dialog>

      <el-dialog title="编辑新增表格商品" :visible.sync="editAddCargoDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="商品名称">
            <el-input v-model="createCargoDialog.cargoName" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="商品数量">
            <el-input v-model="createCargoDialog.quantities" autocomplete="off"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editAddCargoDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="addEditCargoDes()">确 定</el-button>
        </div>
      </el-dialog>

      <el-dialog title="新增编辑表格商品" :visible.sync="createEditCargoDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="商品名称">
            <el-input v-model="createCargoDialog.cargoName" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="商品数量">
            <el-input v-model="createCargoDialog.quantities" autocomplete="off"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="createEditCargoDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="createEditCargoDes">确 定</el-button>
        </div>
      </el-dialog>

      <el-dialog title="编辑编辑表格商品" :visible.sync="editEditCargoDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="商品名称">
            <el-input v-model="createCargoDialog.cargoName" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="商品数量">
            <el-input v-model="createCargoDialog.quantities" autocomplete="off"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editEditCargoDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="editEditCargoDes()">确 定</el-button>
        </div>
      </el-dialog>

      <el-dialog title="新增入库商品表格" :visible.sync="addEntryQueryCargoDialogVisible" width="30%" >
        <el-form label-width="80px" size="small">
          <el-form-item label="商品名称">
            <el-input v-model="createCargoDialog.cargoName" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="商品数量">
            <el-input v-model="createCargoDialog.planQuantities" autocomplete="off"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="addEntryQueryCargoDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="addEntryQueryCargoDes()">确 定</el-button>
        </div>
      </el-dialog>

      <el-dialog title="编辑入库商品表格" :visible.sync="editEntryQueryCargoDialogVisible" width="30%" >
        <el-form label-width="80px" size="small" >
          <el-form-item label="商品名称">
            <el-input v-model="createCargoDialog.cargoName" ></el-input>
          </el-form-item>
          <el-form-item label="商品数量">
            <el-input v-model="createCargoDialog.planQuantities" ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editEntryQueryCargoDialogVisible = false">上一步</el-button>
          <el-button type="primary" @click="editEntryQueryCargoDes()">确 定</el-button>
        </div>
      </el-dialog>




    </el-main>

</template>

<script>
import axios from "axios";
export default{
    name: 'EntryQuery',
    data(){
      return {
        buyTableData: [],
        createCargoTableData: [],
        showCargoTableData:[],
        editCargoTableData:[],
        entryQueryCargoTableData:[],
        buyTotal: 0,
        pageNum: 1,
        pageSize: 10,
        selectDate:["", ""],
        selectStage:"入库",
        createBuyDialog: {},
        editBuyDialog:{},
        createCargoDialog:{},
        entryQueryDialog:{},
        loading:false,
        createBuyDialogVisible: false,
        createDepDialogVisible:false,
        showCargoDescriptionDialogVisible:false,
        addCargoDescriptionDialogVisible:false,
        editCargoDescriptionDialogVisible:false,
        entryQueryDescriptionDialogVisible:false,
        addEntryQueryCargoDialogVisible:false,
        editAddCargoDialogVisible:false,
        createCargoDialogVisible:false,
        editBuyDialogVisible:false,
        createEditCargoDialogVisible:false,
        editEditCargoDialogVisible:false,
        entryQueryDialogVisible:false,
        editEntryQueryCargoDialogVisible:false,
        multipleSelection: [],
        editCargoName:"",
        editAddChosenIndex:"",
        editEditChosenIndex:"",
        editEntryQueryChosenIndex:"",
        resData:{},
        editTempRow:{},
        tempIndex:0

      }
    },
  created() {
    this.load()
  },
  methods: {


      load() {    ////搜索，加载最外层表格函数
      axios.post("http://127.0.0.1:8080/test/buyBill/getAllBuyPage", {
        pageNum: this.pageNum,
        pageSize: this.pageSize,
        from: this.selectDate[0],
        to:this.selectDate[1],
        stage: this.selectStage,

      }).then(res => {
        console.log(res);
        this.buyTableData = res.data.data.list;
        this.resData = res.data;
        this.buyTotal = res.data.data.total;
      })
    },

    reset() {         ////重置最外层表格函数

      this.selectDate[0] =""
      this.selectDate[1] =""
      this.selectStage = "入库"
      this.load()
    },

    chosenBuyBillShow(index, row){     ////最外层表格显示商品详情的按钮
      this.showCargoTableData = this.resData.data.list[index].list;
      this.showCargoDescriptionDialogVisible = true;
    },

    createDepDialogShow(index,row){         //入库功能函数
      this.entryQueryDialogVisible = true;
      this.tempIndex = index;
    },

    nextEntry(){
      this.entryQueryCargoTableData = this.resData.data.list[this.tempIndex].list;
      this.entryQueryDescriptionDialogVisible = true;
    },

    editEntryQueryCarDesShow(index,row){
      // this.createCargoDialog.cargoName = row.cargoName;
      // this.createCargoDialog.planQuantities = row.quantities;
      this.editEntryQueryChosenIndex = index;
      this.editEntryQueryCargoDialogVisible = true;
    },

    editEntryQueryCargoDes(){
      this.entryQueryCargoTableData[this.editEntryQueryChosenIndex].cargoName = this.createCargoDialog.cargoName;
      this.entryQueryCargoTableData[this.editEntryQueryChosenIndex].quantities = this.createCargoDialog.planQuantities;
      this.refresh();
      this.editEntryQueryCargoDialogVisible = false;
    },

    delEntryQueryCargoDes(cargoName){
      let data = this.entryQueryCargoTableData.find(line => line.cargoName === cargoName);
      this.entryQueryCargoTableData.splice(this.entryQueryCargoTableData.indexOf(data), 1);
    },

    entryQueryCarDialogShow(){
      this.addEntryQueryCargoDialogVisible = true;
    },

    addEntryQueryCargoDes(){
      this.entryQueryCargoTableData.push(
        { "cargoName": this.createCargoDialog.cargoName,
          "planQuantities": this.createCargoDialog.planQuantities,
        })
      this.refresh();
      this.addEntryQueryCargoDialogVisible = false;
      this.createEditCargoDialogVisible = false;
    },

    entryQueryCargoDes(){

        let cargoInf = [];
        for(let i = 0; i < this.entryQueryCargoTableData.length; i++){
          cargoInf.push({
            "cargoName" : this.entryQueryCargoTableData[i].cargoName,
            "planQuantities" : this.entryQueryCargoTableData[i].quantities
          });
        }

        console.log(cargoInf);
        console.log(this.entryQueryCargoTableData);
      axios.post("http://127.0.0.1:8080/test/depBill/generateDepBill",
        {
          "warehouseName": this.entryQueryDialog.warehouseName,
          "missionID": this.entryQueryDialog.missionID,
          "date": this.entryQueryDialog.date,
          "stage": "PRE_IN",
          "cargoInf": cargoInf
        }).then(res=>{
        if (res.data.code === 200) {
          this.$message.success("入库成功")
          this.load();
        } else {
          this.$message.error("入库失败")
        }
      });
      this.entryQueryDescriptionDialogVisible = false;
      this.createDepDialogVisible = false;
      this.createBuyDialogVisible = false;

    },


    delBuyBill(billId) {      //删除购货单
      axios.get("http://127.0.0.1:8080/test/buyBill/deleteBuyBill/" + billId).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          this.$message.success("删除成功")
          this.load();
        } else {
          this.$message.error("删除失败")
        }
      })
    },

    addBuyBill() {       // //点击主页面新增按钮后弹出创建新种类对话框函数
      this.createBuyDialogVisible = true
      this.createBuyDialog = {}
    },

    carDesDialogShow() {        ////新增种类的对话框点击下一步后显示商品表格的函数
      this.addCargoDescriptionDialogVisible = true;
    },

    editAddCarDesShow(index,row) {  //新增按钮后新增商品表格的编辑函数
      // this.createCargoDialog.cargoName = row.cargoName;
      // this.createCargoDialog.quantities = row.quantities;
      this.editAddChosenIndex = index;
      this.editAddCargoDialogVisible = true;
    },

    addEditCargoDes() {         //新增商品表格编辑按钮后弹出的对话框中的确认函数
      this.createCargoTableData[this.editAddChosenIndex].cargoName = this.createCargoDialog.cargoName;
      this.createCargoTableData[this.editAddChosenIndex].quantities = this.createCargoDialog.quantities;
      this.refresh();
      this.editAddCargoDialogVisible = false;
    },

    createCarDialogShow() {     // //新增商品表格中弹出添加商品对话框的函数
      this.createCargoDialogVisible = true;
    },

    addCargoDes() {        ////新增商品中添加商品对话框中点击确定添加的函数，将商品信息暂存到新增表格
      this.createCargoTableData.push(
        { "cargoName": this.createCargoDialog.cargoName,
          "quantities": this.createCargoDialog.quantities,
        });
      this.refresh();
      this.createCargoDialogVisible = false;
    },

    delCreateCargoDes(cargoName) {        //新增商品表格中删除商品的函数
      let data = this.createCargoTableData.find(line => line.cargoName === cargoName);
      this.createCargoTableData.splice(this.createCargoTableData.indexOf(data), 1);
    },

    finish() {              //将新增种类和该种类中新增的商品表格数据传回后台的函数
      axios.post("http://127.0.0.1:8080/test/buyBill/generateBuyBill",
        { "date": this.createBuyDialog.date,
          "planCargoInf": this.createCargoTableData,
          "warehouseName": this.createBuyDialog.warehouseName}).then(res=>{
        if (res.data.code === 200) {
          this.$message.success("新增成功")
          this.load();
        } else {
          this.$message.error("新增失败")
        }
        this.load();
      });
      this.addCargoDescriptionDialogVisible = false;
      this.createDepDialogVisible = false;
      this.createBuyDialogVisible = false;
    },

    chosenBuyBillEdit(index,row) {  //点击最外层表格后编辑按钮的函数，弹出编辑框
      this.editBuyDialog = JSON.parse(JSON.stringify(row));
      this.editCargoTableData = this.resData.data.list[index].list;
      this.editEditChosenIndex = index;
      this.editBuyDialogVisible = true;
    },

    nextEdit(){             ////编辑种类的下一步按钮，进入到编辑商品的表格
      this.editCargoDescriptionDialogVisible = true;
    },

    editEditCarDesShow(index,row) {  //编辑商品表格中的编辑按钮，打开编辑对话框
      // this.createCargoDialog.cargoName = row.cargoName;
      // this.createCargoDialog.quantities = row.quantities;
      this.editEditChosenIndex = index;
      this.editEditCargoDialogVisible = true;
    },

    editEditCargoDes() {         //编辑编辑对话框中的确认按钮，将编辑的内容暂存表格
      console.log(this.editEditChosenIndex);
      this.editCargoTableData[this.editEditChosenIndex].cargoName = this.createCargoDialog.cargoName;
      this.editCargoTableData[this.editEditChosenIndex].quantities = this.createCargoDialog.quantities;
      this.refresh();
      this.editEditCargoDialogVisible = false;
    },

    editCarDialogShow() {        //编辑表格中的新增按钮，弹出编辑表格中的新增对话框
      this.createEditCargoDialogVisible = true;
    },

    createEditCargoDes() {//编辑商品中添加商品对话框中点击确定添加的函数，将商品信息暂存到编辑表格
      this.editCargoTableData.push(
        { "cargoName": this.createCargoDialog.cargoName,
        "quantities": this.createCargoDialog.quantities,
      })
      this.refresh();
      this.createCargoDialogVisible = false;
      this.createEditCargoDialogVisible = false;
    },

    delEditCargoDes(cargoName) {        //编辑表格中删除商品按钮
      let data = this.editCargoTableData.find(line => line.cargoName === cargoName);
      this.editCargoTableData.splice(this.editCargoTableData.indexOf(data), 1);
    },

    editCargoDes(){         // //将编辑商品表格中的数据传回后台
      axios.post("http://127.0.0.1:8080/test/buyBill/changeBuyBill",
        {
          "id": this.editBuyDialog.id,
          "warehouseName": this.editBuyDialog.warehouseName,
          "date":this.editBuyDialog.date,
          "planCargoInf": this.editCargoTableData
        }).then(res=>{
        if (res.data.code === 200) {
          this.$message.success("编辑成功")
          this.load();
        } else {
          this.$message.error("编辑失败")
        }
        this.editCargoDescriptionDialogVisible = false, this.editBuyDialogVisible = false

      });

    },

    refresh(){
      this.createCargoDialog.cargoName = "";
      this.createCargoDialog.quantities = "";
    },
    handleSelectionChange(val) {
      console.log(val)
      this.multipleSelection = val
    },

    handleSizeChange(pageSize) {
      console.log(pageSize)
      this.pageSize = pageSize
      this.load()
    },
    handleCurrentChange(pageNum) {
      console.log(pageNum)
      this.pageNum = pageNum
      this.load()
    },
  }
}

</script>

<style>

  .el-table .warning-row {
      background: oldlace;
    }

    .el-table .success-row {
      background: #00aaff;
    }

  .el-table .quehuo {
    background: #FF0000;
  }

  .btn1 {
    position: relative;
    right: 0.625rem;
  }

</style>
